import { createApp } from "vue";
const app = createApp(App);
import App from "./App.vue";
//引入router
import router from "./router";
app.use(router);
//引入element-plus
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
//element-plus国际化(@ts-ignore忽略打包ts校验本行错误)
//@ts-ignore
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
app.use(ElementPlus, {
  locale: zhCn,
});
// 注册所有图标
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
//引入粒子动画
import Particles from "particles.vue3";
app.use(Particles);
//pinia缓存
import pinia from "@/store";
app.use(pinia);
//svg配置
import "virtual:svg-icons-register";
//打印当前环境变量
console.log("环境配置：", import.meta.env);
//引入自定义插件对象：注册整个项目全局组件
import globalComponent from "@/components";
app.use(globalComponent);
//引入路由鉴权
import "@/permission";
//引入全局样式
import "@/styles/index.scss";

app.mount("#app");
